package com.xingda.packing.enums;

import lombok.Getter;

public enum ShuntAreaType {
    UNKNOW(0, "未知"),
    LEFT(1, "左"),
    RIGHT(2, "右");


    ShuntAreaType(int typeId, String typeName) {
        this.typeId = typeId;
        this.typeName = typeName;
    }

    public static ShuntAreaType getByLocation(int typeId) {
        for (ShuntAreaType value : ShuntAreaType.values()) {
            if (value.getTypeId() == typeId) {
                return value;
            }
        }
        return UNKNOW;
    }

    @Getter
    private final int typeId;

    @Getter
    private final String typeName;
}
